package com.njlime.cms.service.app;

import com.njlime.cms.entities.InformationComment;
import com.njlime.cms.repository.app.AppInformationCommentDao;
import com.njlime.core.helper.PageBean;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Created by Dean on 2017/10/10.
 */

@Service
public class AppInformationCommentService {
    @Resource
    private AppInformationCommentDao appInformationCommentDao;


    /**
     * 保存热点评论
     *
     * @param info
     */
    @Transactional(readOnly = false)
    public void save(InformationComment info) {
        appInformationCommentDao.save(info);
    }

    /**
     * 评论分页列表
     *
     * @param pageBean
     * @param comment
     * @return
     */
    public PageBean list(PageBean pageBean, InformationComment comment) {
        return appInformationCommentDao.list(pageBean, comment);
    }


    /**
     * 评论点赞数
     * @param id
     */
    public void fabulousNumUpdate(Integer id, int num) {
        appInformationCommentDao.fabulousNumUpdate(id, num);
    }

}
